Skip to content

GH-42220: [R] handle vctrs_rcrd extension type in metadata cleaning - #42226

Merged
thisisnic merged 1 commit into
apache:mainfrom
nealrichardson:fix-vctrs-ptype
Jun 22, 2024
Merged

thisisnic merged 1 commit into
apache:mainfrom
nealrichardson:fix-vctrs-ptype

Conversation

@nealrichardson

@nealrichardson nealrichardson commented Jun 20, 2024 •

Copy link
Copy Markdown
Member

Rationale for this change

See #42220. Extension type metadata serialization works slightly differently from the general R metadata path: it uses a vctrs::ptype object, which is 0-length with attributes. The sanitization needs to happen on attributes(), not the object being serialized.

The error was caused because vctrs_rcrd has a special [<- method, so iterating over it and assigning back in the sanitized version (even if it were the right thing to do) failed.

What changes are included in this PR?

Sanitize the attributes() of vctrs ptypes.

Are these changes tested?

yes

Are there any user-facing changes?

other than the bug being fixed, no

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #42220 has been automatically assigned in GitHub to PR creator.

@thisisnic thisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for fixing this @nealrichardson !

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 230859b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 14 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants